<?php
/**
 *  支付方式
 */

class Payment extends APIBase {
	public $tag = "Payment";
	public $isLogin = true;
	
	public function before() {
		$this->initMysql();
		$this->inithttp();
		$this->initCacheRedis();
		return true;
	}
			
	public function logic() {
	    $key = $this->cache_redis->keys("hp:*");
		$uid = $this->uid;
		for($i=1;$i<=count($key);$i++){
			$payinfo = $this->cache_redis->hGetAll("hp:$i");
			if($payinfo['status']==1){
				$data[] = $payinfo;
			}
		}
	    $this->returnData($data);
		
	}

	public function after() {
		$this->deinitDataRedis();
		$this->deinitMysql();
	}
}

?>
